;--------------------------------
Object AmericaJetSpectreGunship

  ; *** ART Parameters ***

  Draw = W3DOverlordAircraftDraw ModuleTag_01 ; Works with the dependencyModelDraw of the upgrade portable structures



    ;----NORMAL-------------
    DefaultConditionState
      Model           = AVSGunship
      WeaponFireFXBone    = PRIMARY MUZZLE
      WeaponFireFXBone    = SECONDARY MUZZLE
      WeaponMuzzleFlash   = PRIMARY MUZZLEFX
      WeaponMuzzleFlash   = SECONDARY MUZZLEFX
    End

    ConditionState    = DOOR_1_OPENING
      Model           = AVSGunship                 
      Animation       = AVSGunship.AVSGunship    
      AnimationMode   = ONCE
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 SpectreContrail
      ParticleSysBone = WingTip02 SpectreContrail
    End

    ConditionState    = DOOR_1_CLOSING
      Model           = AVSGunship                 
      Animation       = AVSGunship.AVSGunship    
      AnimationMode   = ONCE_BACKWARDS
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
      ParticleSysBone = Engine01 SpectreAfterburnerTrail
      ParticleSysBone = Engine02 SpectreAfterburnerTrail
      ParticleSysBone = Engine01 SpectreEngineFlare
      ParticleSysBone = Engine02 SpectreEngineFlare
    End


    ;----DAMAGED-------------
    ConditionState    = DOOR_1_OPENING DAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 SpectreContrail
      ParticleSysBone = WingTip02 SpectreContrail
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End

    ConditionState    = DOOR_1_CLOSING DAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE_BACKWARDS
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
      ParticleSysBone = Engine01 SpectreAfterburnerTrail
      ParticleSysBone = Engine02 SpectreAfterburnerTrail
      ParticleSysBone = Engine01 SpectreEngineFlare
      ParticleSysBone = Engine02 SpectreEngineFlare
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End


    ;----REALLY DAMAGED-------------
    ConditionState    = DOOR_1_OPENING REALLYDAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 SpectreContrail
      ParticleSysBone = WingTip02 SpectreContrail
      ParticleSysBone = Smoke01 SpectreGunshipFireLarge
      ParticleSysBone = Smoke02 SpectreGunshipFireLarge
      ParticleSysBone = Smoke03 SpectreGunshipFireLarge
      ParticleSysBone = Smoke04 SpectreGunshipFireLarge
      ParticleSysBone = Smoke05 SpectreGunshipFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 SpectreSmokeLarge
      ParticleSysBone = Smoke03 JetSmokeLarge
      ParticleSysBone = Smoke04 SpectreSmokeLarge
    End

    ConditionState    = DOOR_1_CLOSING REALLYDAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE_BACKWARDS
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
      ParticleSysBone = Engine01 SpectreAfterburnerTrail
      ParticleSysBone = Engine02 SpectreAfterburnerTrail
      ParticleSysBone = Engine01 SpectreEngineFlare
      ParticleSysBone = Engine02 SpectreEngineFlare
      ParticleSysBone = Smoke01 SpectreGunshipFireLarge
      ParticleSysBone = Smoke02 SpectreGunshipFireLarge
      ParticleSysBone = Smoke03 SpectreGunshipFireLarge
      ParticleSysBone = Smoke04 SpectreGunshipFireLarge
      ParticleSysBone = Smoke05 SpectreGunshipFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 SpectreSmokeLarge
      ParticleSysBone = Smoke03 JetSmokeLarge
      ParticleSysBone = Smoke04 SpectreSmokeLarge
    End


    ConditionState = RUBBLE
      Model           = AVSGunship_D1
      ParticleSysBone = Smoke01 SpectreGunshipFireLarge
      ParticleSysBone = Smoke05 SpectreGunshipFireLarge
      ParticleSysBone = Smoke03 SpectreGunshipFireLarge
      ParticleSysBone = Smoke04 SpectreGunshipFireLarge
      ParticleSysBone = Smoke01 SpectreSmokeLarge
      ParticleSysBone = Smoke03 SpectreSmokeLarge
      ParticleSysBone = Smoke02 SpectreSmokeLarge
      ParticleSysBone = Smoke05 SpectreSmokeLarge
    End
    AliasConditionState = REALLYDAMAGED RUBBLE
    AliasConditionState = REALLYDAMAGED RUBBLE DOOR_1_CLOSING
    AliasConditionState = REALLYDAMAGED RUBBLE DOOR_1_OPENING
  


   OkToChangeModelColor = Yes

   ParticlesAttachedToAnimatedBones = Yes 


 End



  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:SpectreGunship
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 300.0 
  ShroudClearingRange = 300
  Prerequisites
    Object = AmericaAirfield
  End

  ArmorSet
    Conditions      = None
    Armor           = SpectreGunshipArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresSpectreGunshipArmor
    DamageFX              = None
  End


  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   SpectreHowitzerGun
  End

  ExperienceValue = 50 100 150 400    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Not Player built, so no veterancy..............................

  ; *** AUDIO Parameters ***
  VoiceSelect         = SpectreGunshipVoiceSelect
  VoiceAttack         = SpectreGunshipVoiceAttack
  VoiceMove         = SpectreGunshipVoiceMove
  SoundAmbient = SpectreGunshipAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    Afterburner    = SpectreGunshipAfterburnerLoop
    HowitzerFire   = SpectreHowitzerWeapon
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_ATTACK VEHICLE AIRCRAFT SCORE SELECTABLE EMP_HARDENED

  Body = ActiveBody ModuleTag_03
    MaxHealth       = 1000.0
    InitialHealth   = 1000.0
  End

  ExperienceValue     = 40 40 40 40  ; Experience point value at each level

  Behavior                          = JetSlowDeathBehavior ModuleTag_04
    DestructionDelay                = 99999999  ; destruction will happen when we
    RollRate                        = 0.0
    RollRateDelta                   = 100%      ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%    ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_SpectreGunshipExplosionLight
    OCLInitialDeath                 = None
    DelaySecondaryFromInitialDeath  = 500       ; in milliseconds
    FXSecondary                     = FX_spectreDeathExplosion
    OCLSecondary                    = None
    FXHitGround                     = FX_spectreGunshipDeathExplosion
    OCLHitGround                    = OCL_A10DeathHitGround
    DelayFinalBlowUpFromHitGround   = 200       ; in milliseconds
  ; FXFinalBlowUp                   = FX_spectreGunshipDeathExplosion
    OCLFinalBlowUp                  = OCL_SpectreDeathFinalBlowUp
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  ;SCRIPTED SUPPORT: These special power is triggered directly 
  ;from the transport without creating a transport. This is done 
  ;via new code support and CreateLocation USE_OWNER_OBJECT -- 
  ;which also prevents creating the payload transport.

  Behavior = AIUpdateInterface ModuleTag_07
    ForbidPlayerCommands = Yes ; this AIUpdate will only do command if from script or AI, not player
  End
  Locomotor = SET_PANIC SpectreGunshipTransitLocomotor
  Locomotor = SET_NORMAL SpectreGunshipOrbitLocomotor

  Behavior = SpecialAbility ModuleTag_32 
    SpecialPowerTemplate = SuperweaponSpectreGunship
    UpdateModuleStartsAttack = Yes
  End


  Behavior = SpectreGunshipUpdate ModuleTag_10
    GattlingStrafeFXParticleSystem  = SpectreGattlingArmsSmoke
    SpecialPowerTemplate            = SuperweaponSpectreGunship
    HowitzerWeaponTemplate          = SpectreHowitzerGun
    GattlingTemplateName            = SpectreGunshipGattlingCannon 
    RandomOffsetForHowitzer = 20     
    TargetingReticleRadius  = 25
    OrbitInsertionSlope     = 0.7   ; steepness of orbit entry
    GunshipOrbitRadius      = 250
    HowitzerFiringRate      = 300   ; how long between each attempted shot of howitzer
    HowitzerFollowLag       = 400 ;600   ; how long after gattling acquires target can howitzer shoot same
    StrafingIncrement       = 20    ; how far apart is each shot of the gattling as it strafes
    AttackAreaRadius        = 200
    OrbitTime               = 15000 ;20000 ;32000 ; thirty-two seconds

    AttackAreaDecal
      Texture           = SCCSpecTarg
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 1500
      Color             = R:127 G:177 B:222 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
    TargetingReticleDecal
      Texture           = SCCSpecRet
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 50%
      OpacityMax        = 100%
      OpacityThrobTime  = 300
      Color             = R:127 G:177 B:222 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
  End





  Behavior = HelixContain ModuleTag_09
    Slots                     = 1
    DamagePercentToUnits      = 100%
    AllowInsideKindOf         = PORTABLE_STRUCTURE
    PassengersAllowedToFire   = Yes
    ShouldDrawPips            = No
  End


  Behavior = FlammableUpdate ModuleTag_08
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_11
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 4     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 5     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

;;;;;;;;  ClientUpdate             = AnimatedParticleSysBoneClientUpdate ModuleTag_Client01
;;;;;;;;  End                  ; This allows the wingtip trails to stay stuck to the retractable wings
  

  Geometry = Box
  GeometryIsSmall = No
  GeometryMajorRadius = 40.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End
;--------------------------------
;------------------------------------------------------------------------------
Object SpectreGunshipGattlingCannon

  ; *** ART Parameters ***
  Draw                    = W3DDependencyModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes
    AttachToBoneInContainer = CHASIS

    DefaultConditionState
      Model               = AVSGUNSHIP_GUN
      TurretPitch         = TURRETEL01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
    End

  End

  ; ***DESIGN parameters ***
  Side             = China
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   SpectreGattlingGun
  End
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor ; We can't be hurt on the field.  We share damage from the Overlord with his damage module
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound ;TurretMoveLoop
    VoiceRapidFire  = NoSound
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI
    Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY 
      TurretTurnRate      = 160   // turn rate, in degrees per sec
      TurretPitchRate     = 160
      AllowsPitch         = Yes
    End
    AutoAcquireEnemiesWhenIdle = No 
  End

  Behavior             = DestroyDie ModuleTag_04
    ;nothing
  End

  Geometry            = BOX
  GeometryMajorRadius = 20.0
  GeometryMinorRadius = 3.0
  GeometryHeight      = 3.0
  GeometryIsSmall     = No      
  Shadow              = NONE

End

;------------------------------------------------------------------------------
Object SpectreGunshipHowitzer

  ; *** ART Parameters ***
  Draw                    = W3DModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes

    DefaultConditionState
      Model               = AVSGUNSHIP_GHOW
      TurretPitch         = TURRETEL01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
    End

  End

  ; ***DESIGN parameters ***
  Side             = China
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   SpectreHowitzerGun
  End
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor ; We can't be hurt on the field.  We share damage from the Overlord with his damage module
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound ;TurretMoveLoop
    VoiceRapidFire  = NoSound
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI
    Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY SECONDARY
      TurretTurnRate      = 60   // turn rate, in degrees per sec
      TurretPitchRate     = 60
      AllowsPitch         = Yes
    End
    AutoAcquireEnemiesWhenIdle = No 
  End

  Behavior             = DestroyDie ModuleTag_04
    ;nothing
  End

  Behavior = StealthDetectorUpdate ModuleTag_06
    DetectionRate   = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange = ??? ;   Defaults to VisionRange
    CanDetectWhileContained   = Yes
  End

  Geometry            = BOX
  GeometryMajorRadius = 13.0
  GeometryMinorRadius = 13.0
  GeometryHeight      = 8.0
  GeometryIsSmall     = No      
  Shadow              = NONE

End









;------------------------------------------------------------------------------
Object AmericaJetRaptor

  ; *** ART Parameters ***
  SelectPortrait         = T21
  ButtonImage            = T21
  
  UpgradeCameo1 = Upgrade_AmericaLaserMissiles
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw                   = W3DModelDraw ModuleTag_01
 
    DefaultConditionState
      Model               = avf16
      HideSubObject       = BurnerFX01 BurnerFX02
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = avf16
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = avf16
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = avf16
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = avf16
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = avf16
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    OkToChangeModelColor = Yes

  End

  ; ***DESIGN parameters ***
  DisplayName             = OBJECT:Raptor
  EditorSorting           = VEHICLE
  Side                    = America
  TransportSlotCount      = 0 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange             = 200.0 
  ShroudClearingRange     = 400
  Prerequisites
    Object                = AmericaAirfield
  End

  WeaponSet
    Conditions            = None 
    Weapon                = PRIMARY RaptorJetMissileWeapon
  End
  WeaponSet
    Conditions            = PLAYER_UPGRADE 
    Weapon                = PRIMARY RaptorJetLaserGuidedMissileWeapon
  End
  ArmorSet
    Conditions            = None
    Armor                 = AirplaneArmor
    DamageFX              = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End


  BuildCost               = 1400
  BuildTime               = 20   
  ExperienceValue         = 50 50 100 150  ;Experience point value at each level
  ExperienceRequired      = 0 100 200 400   ;Experience points needed to gain each level
  IsTrainable             = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = AmericaJetRaptorCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect            = RaptorVoiceSelect
  VoiceMove              = RaptorVoiceMove
  VoiceAttack            = RaptorVoiceAttack
  VoiceAttackAir         = RaptorVoiceAttackAir
  VoiceGuard             = RaptorVoiceAirPatrol
  SoundAmbient           = RaptorAmbientLoop
  SoundAmbientRubble     = NoSound
  ; SoundMoveLoop          = RaptorAmbientLoop  ; don't want sound while sitting at airfield
  ; SoundAmbient           = NoSound
  UnitSpecificSounds
    VoiceCreate          = RaptorVoiceCreate
    SoundEject           = PilotSoundEject
    VoiceEject           = PilotVoiceEject
    Afterburner          = RaptorAfterburner
    VoiceLowFuel         = RaptorVoiceLowFuel
    VoiceGarrison        = RaptorVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority          = UNIT
  KindOf                 = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body                   = ActiveBody ModuleTag_02
    MaxHealth            = 160.0
    InitialHealth        = 160.0
  End

  Behavior                = WeaponSetUpgrade ModuleTag_03
    TriggeredBy           = Upgrade_AmericaLaserMissiles
  End
  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 3     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 1.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_04
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_05
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_RaptorDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_RaptorDeathInitial
    OCLInitialDeath                 = OCL_RaptorDeathInitial
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = OCL_RaptorDeathSecondary
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_RaptorDeathHitGround
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_RaptorDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior                    = EjectPilotDie ModuleTag_06
    ExemptStatus         = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End
  
  Behavior               = PhysicsBehavior ModuleTag_07
    Mass                 = 500.0
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
  End
  Locomotor = SET_NORMAL RaptorJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End


  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length.

End


;------------------------------------------------------------------------------
Object AmericaJetAircraftCarrierRaptor

  ; *** ART Parameters ***
  SelectPortrait         = SACRaptor_L
  ButtonImage            = SACRaptor
  
  UpgradeCameo1 = Upgrade_AmericaLaserMissiles
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw                   = W3DModelDraw ModuleTag_01
 
    DefaultConditionState
      Model               = AVRaptor
      HideSubObject       = BurnerFX01 BurnerFX02
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = AVRaptor_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVRaptor_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVRaptor_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = AVRaptor_D1B
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVRaptor_D1B
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    OkToChangeModelColor = Yes

  End

  ; ***DESIGN parameters ***
  DisplayName             = OBJECT:Raptor
  EditorSorting           = VEHICLE
  Side                    = America
  TransportSlotCount      = 0 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange             = 180.0 
  ShroudClearingRange     = 400

  WeaponSet
    Conditions            = None 
    Weapon                = PRIMARY AircraftCarrierRaptorJetMissileWeapon
  End
  WeaponSet
    Conditions            = PLAYER_UPGRADE 
    Weapon                = PRIMARY AircraftCarrierRaptorJetLaserGuidedMissileWeapon
  End
  ArmorSet
    Conditions            = None
    Armor                 = AirplaneArmor
    DamageFX              = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End


  BuildCost               = 0
  BuildTime               = 4   
  ExperienceValue         = 50 50 100 150  ;Experience point value at each level
  ExperienceRequired      = 0 100 200 400   ;Experience points needed to gain each level
  IsTrainable             = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = AmericaJetRaptorCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect            = RaptorVoiceSelect
  VoiceMove              = RaptorVoiceMove
  VoiceAttack            = RaptorVoiceAttack
  VoiceAttackAir         = RaptorVoiceAttackAir
  VoiceGuard             = RaptorVoiceAirPatrol
  SoundAmbient           = RaptorAmbientLoop
  SoundAmbientRubble     = NoSound
  ; SoundMoveLoop          = RaptorAmbientLoop  ; don't want sound while sitting at airfield
  ; SoundAmbient           = NoSound
  UnitSpecificSounds
    VoiceCreate          = NoSound
    SoundEject           = PilotSoundEject
    VoiceEject           = PilotVoiceEject
    Afterburner          = RaptorAfterburner
    VoiceLowFuel         = RaptorVoiceLowFuel
    VoiceGarrison        = RaptorVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority          = UNIT
  KindOf                 = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK VEHICLE SCORE AIRCRAFT
  Body                   = ActiveBody ModuleTag_02
    MaxHealth            = 160.0
    InitialHealth        = 160.0
  End

  Behavior                = WeaponSetUpgrade ModuleTag_03
    TriggeredBy           = Upgrade_AmericaLaserMissiles
  End
  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 3     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 1.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_04
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_05
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_RaptorDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_RaptorDeathInitial
    OCLInitialDeath                 = OCL_RaptorDeathInitial
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = OCL_RaptorDeathSecondary
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_RaptorDeathHitGround
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_RaptorDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior                    = EjectPilotDie ModuleTag_06
    ExemptStatus         = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End
  
  Behavior               = PhysicsBehavior ModuleTag_07
    Mass                 = 500.0
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
    AutoAcquireEnemiesWhenIdle = YES ATTACK_BUILDINGS
  End
  Locomotor = SET_NORMAL RaptorJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End


  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length.

End







;------------------------------------------------------------------------------
Object AmericaJetB52

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    DefaultConditionState
      Model = AVBomber
      ParticleSysBone = Engine00 JetBlackTrailThin
      ParticleSysBone = Engine02 JetBlackTrailThin
      ParticleSysBone = Engine03 JetBlackTrailThin
      ParticleSysBone = Engine04 JetBlackTrailThin
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
    End
    ConditionState = DAMAGED
      Model = AVBomber_D
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Engine00 JetBlackTrailThin
      ParticleSysBone = Engine02 JetBlackTrailThin
      ParticleSysBone = Engine03 JetBlackTrailThin
      ParticleSysBone = Engine04 JetBlackTrailThin
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End
    ConditionState = REALLYDAMAGED
      Model = AVBomber_D
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Engine00 JetBlackTrailThin
      ParticleSysBone = Engine02 JetBlackTrailThin
      ParticleSysBone = Engine03 JetBlackTrailThin
      ParticleSysBone = Engine04 JetBlackTrailThin
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End
    ConditionState = RUBBLE
      Model = AVBomber_D1
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End
    OkToChangeModelColor = Yes
  End
  
  Draw = W3DModelDraw ModuleTag_02
    DefaultConditionState
      Model           = AVBomber_A2U
      Animation       = AVBomber_A2K.AVBomber_A2
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState = DOOR_1_OPENING
      Animation       = AVBomber_A2K.AVBomber_A2
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState = DOOR_1_CLOSING
      Animation       = AVBomber_A2K.AVBomber_A2
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST MAINTAIN_FRAME_ACROSS_STATES
    End

    ConditionState = REALLYDAMAGED
      Model           = AVBomber_A2DU
      Animation       = AVBomber_A2K.AVBomber_A2
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState = DOOR_1_OPENING REALLYDAMAGED
      Model           = AVBomber_A2DU
      Animation       = AVBomber_A2K.AVBomber_A2
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState = DOOR_1_CLOSING REALLYDAMAGED
      Model           = AVBomber_A2DU
      Animation       = AVBomber_A2K.AVBomber_A2
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST MAINTAIN_FRAME_ACROSS_STATES
    End
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:B52
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 0.0 
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = TankDamageFX
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End
  CommandSet        = Command_ScriptedTransportDrops

  ; *** AUDIO Parameters ***
  SoundAmbient = B52AmbientLoop
  SoundAmbientRubble    = NoSound

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK  VEHICLE SCORE TRANSPORT AIRCRAFT IGNORED_IN_GUI EMP_HARDENED
  Body = ActiveBody ModuleTag_03
    MaxHealth       = 1000.0
    InitialHealth   = 1000.0
  End

  ExperienceValue     = 50 50 50 50  ; Experience point value at each level

  ;SCRIPTED SUPPORT: These special powers are triggered directly 
  ;from the transport without creating a transport. This is done 
  ;via new code support and CreateLocation USE_OWNER_OBJECT -- 
  ;which also prevents creating the payload transport.
  Behavior    = OCLSpecialPower ModuleTag_04
    SpecialPowerTemplate = SuperweaponDaisyCutter  ;@@KRIS@@
    OCL                  = SUPERWEAPON_DaisyCutter
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End
  Behavior    = OCLSpecialPower ModuleTag_05
    SpecialPowerTemplate = SuperweaponParadropAmerica
    UpgradeOCL           = SCIENCE_Paradrop3 SUPERWEAPON_Paradrop3
    UpgradeOCL           = SCIENCE_Paradrop2 SUPERWEAPON_Paradrop2
    OCL                  = SUPERWEAPON_Paradrop1
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End 
  Behavior    = OCLSpecialPower ModuleTag_06
    SpecialPowerTemplate = SuperweaponCarpetBomb
    OCL                  = SUPERWEAPON_CarpetBomb
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End 
   
  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 500.0
  End

  Behavior = DeliverPayloadAIUpdate ModuleTag_08
    DoorDelay         = 500
    MaxAttempts       = 4
    DropOffset        = X:0 Y:0 Z:-10
    DropDelay         = 300     ; time in between each item dropped (if more than one)
    PutInContainer    = AmericaParachute
    DeliveryDistance  = 150
  End
  Locomotor = SET_NORMAL B52Locomotor

  Behavior = TransportContain ModuleTag_09
    Slots                       = 100                     ; hey, it's a BIG transport
    ScatterNearbyOnExit         = No
    OrientLikeContainerOnExit   = Yes
    KeepContainerVelocityOnExit = Yes
    ExitPitchRate               = 30
    ExitBone                    = WeaponA01
    AllowInsideKindOf           = INFANTRY VEHICLE PROJECTILE DOZER PARACHUTABLE
    DoorOpenTime                = 0                ; this prevents the Contain module from messing with the doors, since we want DeliverPayload to handle 'em
    NumberOfExitPaths           = 0
    DestroyRidersWhoAreNotFreeToExit = Yes  ; 'destroy' as opposed to 'kill'
  End
    
  Behavior                          = JetSlowDeathBehavior ModuleTag_10
    DestructionDelay                = 2000 
    RollRate                        = 0.0
    RollRateDelta                   = 100%      ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0
    FallHowFast                     = 25.0%    ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_JetBigDeathInitial
    OCLInitialDeath                 = OCL_AmericaJetCargoDeathStart
    DelaySecondaryFromInitialDeath  = 2000       ; in milliseconds     This guy won't hit the ground, so this time equals the above time
    OCLSecondary                    = OCL_AmericaJetCargoHulkDeath
    FXSecondary                     = FX_BigPlaneDeath
;   FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
;   OCLFinalBlowUp                  = OCL_AuroraDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End

  Behavior = TransitionDamageFX ModuleTag_11
    DamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_12
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 4     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 5     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Geometry = Box
  GeometryIsSmall = No
  GeometryMajorRadius = 60.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End







;------------------------------------------------------------------------------
Object AmericaJetAurora

  ; *** ART Parameters ***
  SelectPortrait         = SAAurora_L
  ButtonImage            = SAAurora
  
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model               = AVAurora
      HideSubObject       = BurnerFX03 BurnerFX04
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = AVAurora_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVAurora_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVAurora_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = AVAurora_D1
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVAurora_D1
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Aurora
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 180.0 
  ShroudClearingRange = 600
  Prerequisites
    Object = AmericaAirfield
    Object = AmericaStrategyCenter
  End
  BuildCost           = 2500
  BuildTime           = 30.0          ;in seconds     
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY AuroraBombWeapon
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End

  ExperienceValue = 200 200 400 400   ;Experience point value at each level
  ExperienceRequired = 0 200 400 800  ;Experience points needed to gain each level
  IsTrainable = Yes                   ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet        = AmericaJetAuroraCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = AuroraBomberVoiceSelect
  VoiceMove = AuroraBomberVoiceMove
  VoiceGuard = AuroraBomberVoiceMove
  VoiceAttack = AuroraBomberVoiceAttack
  SoundAmbient = AuroraBomberAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    VoiceCreate          = AuroraBomberVoiceCreate
    SoundEject           = PilotSoundEject
    VoiceEject           = PilotVoiceEject
    Afterburner          = RaptorAfterburner
    VoiceLowFuel         = AuroraBomberVoiceLowFuel
    VoiceGarrison        = AuroraBomberVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 80.0
    InitialHealth   = 80.0
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_AuroraDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_AuroraDeathInitial
    ;OCLInitialDeath                = None
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    ;OCLSecondary                   = None
    FXHitGround                     = FX_JetDeathHitGround
    ;OCLHitGround                   = None
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_AuroraDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior = EjectPilotDie ModuleTag_04
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    ExemptStatus = HIJACKED
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_06
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = JetAIUpdate ModuleTag_07
    OutOfAmmoDamagePerSecond    = 10%    ; amount of damage to take per SEC (not per frame) when out of ammo
                                         ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift       = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause                = 500
    MinHeight                   = 5
    SneakyOffsetWhenAttacking   = -20.0  ; this is how far behind us people aim when we are in attack mode
    AttackLocomotorType         = SET_SUPERSONIC
    AttackLocomotorPersistTime  = 100    ; we start slowing down almost immediately
    AttackersMissPersistTime    = 2000   ; but remain untargetable fer a bit longer
    ReturnForAmmoLocomotorType  = SET_SLUGGISH
    ReturnToBaseIdleTime        = 10000         ; if idle for this long, return to base, even if not out of ammo
  End
  Locomotor = SET_NORMAL      AuroraJetLocomotor
  Locomotor = SET_SUPERSONIC  AuroraJetSupersonicLocomotor
  Locomotor = SET_SLUGGISH    AuroraJetSluggishLocomotor
  Locomotor = SET_TAXIING     BasicJetTaxiLocomotor

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior                 = TransitionDamageFX ModuleTag_22
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End


  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  ShadowSizeX              = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object AmericaJetStealthFighter

  ; *** ART Parameters ***
  SelectPortrait         = SAStealth_L
  ButtonImage            = SAStealth
  
  UpgradeCameo1 = Upgrade_AmericaLaserMissiles
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  UpgradeCameo4 = Upgrade_AmericaBunkerBusters
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model                           = AVStealth
      HideSubObject                   = BurnerFX03 BurnerFX04
      WeaponLaunchBone  = PRIMARY WeaponA
    End
    
    ConditionState        = JETEXHAUST
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburners
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = AVStealth_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVStealth_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVStealth_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburners
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = RUBBLE
      Model               = AVStealth_D1
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVStealth_D1
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End
    
    OkToChangeModelColor = Yes

  End

  ; ***DESIGN parameters ***
  DisplayName           = OBJECT:StealthFighter
  EditorSorting         = VEHICLE
  Side                  = America
  TransportSlotCount    = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange           = 180.0 
  ShroudClearingRange   = 300.0
  Prerequisites
    Object = AmericaAirfield
    Science = SCIENCE_StealthFighter
  End
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY StealthJetMissileWeapon
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE
    Weapon = PRIMARY StealthJetLaserGuidedMissileWeapon
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End

  BuildCost           = 1600
  BuildTime           = 25.0            ;in seconds  
  ExperienceValue     = 100 100 200 300 ;Experience point value at each level
  ExperienceRequired  = 0 200 300 600   ; Experience points needed to gain each level
  IsTrainable         = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = AmericaJetStealthFighterCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect     = StealthFighterVoiceSelect
  VoiceMove       = StealthFighterVoiceMove
  VoiceAttack     = StealthFighterVoiceAttack
  VoiceAttackAir  = StealthFighterVoiceAttackAir
  VoiceGuard      = StealthFighterVoiceAirPatrol
  SoundAmbient    = StealthFighterAmbientLoop
  SoundAmbientRubble    = NoSound
  SoundStealthOn  = StealthOn
  SoundStealthOff = StealthOff
  UnitSpecificSounds
    VoiceCreate   = StealthFighterVoiceCreate
    SoundEject    = PilotSoundEject
    VoiceEject    = PilotVoiceEject
    Afterburner   = RaptorAfterburner
    VoiceLowFuel  = AuroraBomberVoiceLowFuel
    VoiceGarrison = StealthFighterVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = LOCAL_UNIT_ONLY
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 120.0
    InitialHealth   = 120.0
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_StealthDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_StealthFighterDeathInitial
    ;OCLInitialDeath                = None
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    ;OCLSecondary                   = None
    FXHitGround                     = FX_JetDeathHitGround
    ;OCLHitGround                   = None
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_StealthDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior = EjectPilotDie ModuleTag_04
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    ExemptStatus = HIJACKED
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End
 
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  Behavior = JetAIUpdate ModuleTag_06
    OutOfAmmoDamagePerSecond = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause           = 500
    MinHeight              = 5
    ReturnToBaseIdleTime   = 10000         ; if idle for this long, return to base, even if not out of ammo
  End

  Behavior = WeaponSetUpgrade ModuleTag_07
    TriggeredBy = Upgrade_AmericaLaserMissiles
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_08
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Locomotor = SET_NORMAL StealthJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior                 = TransitionDamageFX ModuleTag_22
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End


  Geometry = Cylinder
  GeometryIsSmall = Yes
  GeometryMajorRadius = 7.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 7.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;--------------------Ϊ----------------------------------------------------------
Object AmericaVehicleComanche

  ; *** ART Parameters ***
  SelectPortrait         = T5
  ButtonImage            = T5
  
  UpgradeCameo1 = Upgrade_ComancheRocketPods
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model                           = AvAH64
      HideSubObject                   = MissileUpgrade
      Animation                       = AvAH64.AvAH64
      AnimationMode                   = LOOP
      WeaponMuzzleFlash               = PRIMARY TurretFX
      WeaponFireFXBone                = PRIMARY Muzzle
      WeaponFireFXBone                = SECONDARY Muzzle
      WeaponLaunchBone  = SECONDARY Muzzle
    End

    ConditionState = REALLYDAMAGED
      Model                           = AvAH64
      Animation                       = AvAH64.AvAH64
      AnimationMode                   = LOOP
    End

    ConditionState = WEAPONSET_PLAYER_UPGRADE
      ShowSubObject                   = MissileUpgrade
      Animation                       = AvAH64.AvAH64
      AnimationMode                   = LOOP
      WeaponFireFXBone                = TERTIARY WeaponB
      WeaponLaunchBone  = TERTIARY WeaponB
    End

    ConditionState = WEAPONSET_PLAYER_UPGRADE REALLYDAMAGED
      Model                           = AvAH64
      ShowSubObject                   = MissileUpgrade
      Animation                       = AvAH64.AvAH64
      AnimationMode                   = LOOP
      WeaponFireFXBone                = TERTIARY WeaponB
      WeaponLaunchBone  = TERTIARY WeaponB
    End

    ConditionState = RUBBLE
      Model                           = AvAH64
      Animation                       = AvAH64.AvAH64
      AnimationMode                   = LOOP
    End

    ConditionState = RUBBLE SPECIAL_DAMAGED
      Model                           = AvAH64
      HideSubObject                   = AvAH64
    End

    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Comanche
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 200.0 
  ShroudClearingRange = 600
  Prerequisites
    Object            = AmericaAirfield
  End

  WeaponSet
    Conditions          = None 
    ; -----
    Weapon              = PRIMARY     Comanche20mmCannonWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   ComancheAntiTankMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    NONE
  End
  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    ; -----
    Weapon              = PRIMARY     Comanche20mmCannonWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   ComancheAntiTankMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    ComancheRocketPodWeapon
    AutoChooseSources   = TERTIARY    NONE
  End
  ArmorSet
    Conditions      = None
    Armor           = ComancheArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresComancheArmor
    DamageFX              = None
  End
  BuildCost           = 1500
  BuildTime           = 20              ; in seconds  
  ExperienceValue     = 50 50 100 200   ; Experience point value at each level
  ExperienceRequired  = 0 100 200 400   ; Experience points needed to gain each level
  IsTrainable         = Yes             ; Can gain experience
  CommandSet          = AmericaVehicleComancheCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect           = ComancheVoiceSelect
  VoiceMove             = ComancheVoiceMove
  VoiceGuard            = ComancheVoiceMove
  VoiceAttack           = ComancheVoiceAttack
  SoundAmbient          = ComancheAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = ComancheVoiceCreate
    SoundEject          = PilotSoundEject
    VoiceEject          = PilotVoiceEject
    Afterburner         = RaptorAfterburner
    VoiceGarrison       = ComancheVoiceMove
    TurretMoveStart     = NoSound
    TurretMoveLoop      = NoSound
    VoiceFireRocketPods = ComancheVoiceAttackRocket
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority   = UNIT
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT PRODUCED_AT_HELIPAD

  Behavior = WeaponSetUpgrade ModuleTag_02
    TriggeredBy = Upgrade_ComancheRocketPods
  End
  Behavior = ExperienceScalarUpgrade ModuleTag_03
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Body = ActiveBody ModuleTag_04
    MaxHealth       = 220.0
    InitialHealth   = 220.0
  End

  Behavior = FXListDie ModuleTag_05
    DeathFX = FX_ComancheStartDeath
  End

  Behavior = JetAIUpdate ModuleTag_06
    MinHeight                     = 5
    NeedsRunway                   = No
    KeepsParkingSpaceWhenAirborne = No
    AutoAcquireEnemiesWhenIdle    = Yes
    ; note that comanches do not return to base when idle
    
    ; this is a bit of a trick... normally, units cannot move-and-fire at
    ; the same time. we need the comanche to be able to. so we give it
    ; a "turret" (invisible) and put the two main weapons on it, but with
    ; no turn rate. voila!
    Turret
      TurretTurnRate = 0      ; this "turret" does not turn
      TurretPitchRate = 0     ; nor does it pitch
      ControlledWeaponSlots = PRIMARY SECONDARY
    End

  End
  Locomotor = SET_NORMAL  ComancheLocomotor
  Locomotor = SET_TAXIING BasicHelicopterTaxiLocomotor

  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 50.0
  End
  Behavior = HelicopterSlowDeathBehavior ModuleTag_08
    DestructionDelay                = 99999999        ; the destruction delay
    SpiralOrbitTurnRate             = 140.0           ; in degrees per second, bigger # = tighter spiral
    SpiralOrbitForwardSpeed         = 350.0           ; bigger # = larger spiral
    SpiralOrbitForwardSpeedDamping  = .9999           ; smaller #'s = slow down faster
    MaxBraking                      = 190   ; max braking we can use during death spiral (lower num = wilder spiral)    
    SoundDeathLoop                  = ComancheDamagedLoop
    MinSelfSpin                     = 100                     ; in degrees per second
    MaxSelfSpin                     = 300                     ; in degrees per second
    SelfSpinUpdateDelay             = 100             ; in milliseconds
    SelfSpinUpdateAmount            = 10             ; in degrees   
    FallHowFast                     = 12.0%  ; fraction of gravity, lower = take longer to fall
    MinBladeFlyOffDelay             = 1500            ; in milliseconds
    MaxBladeFlyOffDelay             = 1500            ; in milliseconds
    AttachParticle                  = SootySmokeTrail
    AttachParticleBone              = Propeller02
    BladeObjectName                 = ComancheBlades
    BladeBoneName                   = Propeller01    
    ; Most things that eject pilots do so immediately upon death,
    ; via use of EjectPilotDie, but Helicopters are a special case...
    ; they need to do so after their blades are ejected. 
    OCLEjectPilot                   = OCL_EjectPilotViaParachute
    FXBlade                         = FX_HelicopterBladeExplosion
    OCLBlade                        = OCL_HelicopterBladeExplosion
    FXHitGround                     = FX_HelicopterHitGround
    OCLHitGround                    = OCL_HelicopterHitGround
    FXFinalBlowUp                   = FX_GroundedHelicopterBlowUp
    OCLFinalBlowUp                  = OCL_GroundedHelicopterBlowUp
    DelayFromGroundToFinalDeath     = 1500
    FinalRubbleObject               = ComancheRubbleHull
  End

  Behavior = TransitionDamageFX ModuleTag_09
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 4000  ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry = BOX
  GeometryMajorRadius = 20.0
  GeometryMinorRadius = 3.0
  GeometryHeight = 25.0     
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME    
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End





;------------------------------------------------------------------------------
Object AmericaJetA10Thunderbolt

  ; *** ART Parameters ***
  SelectPortrait         = SAWarthog_L
  ButtonImage            = SAWarthog

  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

    ExtraPublicBone = WeaponA01
    ExtraPublicBone = WeaponA02
    ExtraPublicBone = WeaponA03
    ExtraPublicBone = WeaponA04
    ExtraPublicBone = WeaponA05
    ExtraPublicBone = WeaponA06

    DefaultConditionState
      Model             = AVWarthog
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone  = PRIMARY Muzzle01
      ParticleSysBone = Engine01 JetBlackTrailThin
      ParticleSysBone = Engine02 JetBlackTrailThin
      ParticleSysBone = Wingtip01 JetContrailThin
      ParticleSysBone = Wingtip02 JetContrailThin
    End

    ConditionState      = REALLYDAMAGED
      Model             = AVWarthog_D
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone  = PRIMARY Muzzle01
    End
    AliasConditionState  = RUBBLE

   ParticlesAttachedToAnimatedBones = Yes 

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:A10Thunderbolt
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 300.0 
  ShroudClearingRange = 300
  Prerequisites
    Object = AmericaAirfield
  End
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY A10ThunderboltVulcan
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End

  ExperienceValue = 50 100 150 400    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience

  ; *** AUDIO Parameters ***
  SoundAmbient = A10ThunderboltAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    SoundEject = PilotSoundEject
    VoiceEject = PilotVoiceEject
    StartDive  = A10ThunderboltDive
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK VEHICLE AIRCRAFT SCORE IGNORED_IN_GUI EMP_HARDENED
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 600.0
    InitialHealth   = 600.0
  End

  ExperienceValue     = 40 40 40 40  ; Experience point value at each level

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    DestructionDelay                = 99999999  ; destruction will happen when we
    RollRate                        = 0.0
    RollRateDelta                   = 100%      ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%    ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_JetDeathInitial
    OCLInitialDeath                 = None
    DelaySecondaryFromInitialDeath  = 500       ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = None
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_A10DeathHitGround
    DelayFinalBlowUpFromHitGround   = 200       ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_A10DeathFinalBlowUp
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  ;SCRIPTED SUPPORT: These special power is triggered directly 
  ;from the transport without creating a transport. This is done 
  ;via new code support and CreateLocation USE_OWNER_OBJECT -- 
  ;which also prevents creating the payload transport.
  Behavior    = OCLSpecialPower ModuleTag_06
    SpecialPowerTemplate = SuperweaponA10ThunderboltMissileStrike ;@@KRIS@@
    UpgradeOCL           = SCIENCE_A10ThunderboltMissileStrike3 SUPERWEAPON_A10ThunderboltMissileStrike3
    UpgradeOCL           = SCIENCE_A10ThunderboltMissileStrike2 SUPERWEAPON_A10ThunderboltMissileStrike2
    OCL                  = SUPERWEAPON_A10ThunderboltMissileStrike1
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End

  Behavior = DeliverPayloadAIUpdate ModuleTag_07
  End
  Locomotor = SET_NORMAL A10ThunderboltLocomotor

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 3     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_22
;;;;;;;;  End

  Geometry = Cylinder
  GeometryIsSmall = Yes
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End



;------------------------------------------------------------------------------
Object AmericaVehicleChinook

  ; *** ART Parameters ***
  SelectPortrait         = SAChinook_L
  ButtonImage            = SAChinook
  
  ;UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw                         ModuleTag_01 ; Helicopter 

    ExtraPublicBone = RopeStart
    ExtraPublicBone = RopeEnd

    DefaultConditionState
      Model = AVChinook
      Animation = AVChinook.AVChinook
      AnimationMode = LOOP
    End

    ConditionState = REALLYDAMAGED
      Model = AVChinook_d
      Animation = AVChinook_d.AVChinook_d
      AnimationMode = LOOP
    End

    ConditionState = RUBBLE
      Model = AVChinook_d
      Animation = AVChinook_d.AVChinook_d
      AnimationMode = LOOP
    End

    ConditionState = RUBBLE SPECIAL_DAMAGED
      Model = AVChinook_d
      HideSubObject = Props01
      HideSubObject = Props02
    End

    OkToChangeModelColor = Yes
  End

  Draw = W3DModelDraw                         ModuleTag_02 ; Cargo net 
    ConditionState = NONE
      Model = None  ; Nothing here
      TransitionKey = TRANS_Empty
      WaitForStateToFinishIfPossible = TRANS_Unloading
    End

    ConditionState = DYING 
      Model = None  ; Nothing here
    End
    AliasConditionState = RUBBLE
    AliasConditionState = CARRYING RUBBLE
    AliasConditionState = DOCKING RUBBLE
    AliasConditionState = DOCKING CARRYING RUBBLE
 
     ConditionState = CARRYING
      Model = AVChinook_A ;Carrying a full wobbly net of stuff
      Animation = AVChinook_A.AVChinook_A
      AnimationMode = LOOP
      TransitionKey = TRANS_Full
      WaitForStateToFinishIfPossible = TRANS_PickingUp
    End

    ConditionState = DOCKING
      Model = AVChinook_A1MSH ;Lowering an empty net, pulling up with stuff
      Animation = AVChinook_A1SK.AVChinook_A1
      AnimationMode = ONCE_BACKWARDS
      Flags = START_FRAME_LAST
      AnimationSpeedFactorRange = .75 .75
      TransitionKey = TRANS_PickingUp
      WaitForStateToFinishIfPossible = TRANS_Unloading  ;Trick.  Without hardcoding the difference between what we are docking with, need to use DOCKING for both.
    End

    ConditionState = DOCKING CARRYING
      Model = AVChinook_A1MSH ; Lowering a full net, letting stuff fall out, and pulling up an empty net
      Animation = AVChinook_A1SK.AVChinook_A1
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.75 2.75
      TransitionKey = TRANS_Unloading
      WaitForStateToFinishIfPossible = TRANS_PickingUp  ;Trick.  Without hardcoding the difference between what we are docking with, need to use DOCKING for both.
    End
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Chinook
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 300.0 
  ShroudClearingRange = 600
  BuildCost           = 1200
  BuildTime           = 10.0          ;in seconds  
  Prerequisites
    Object = AmericaSupplyCenter
  End
  ExperienceValue     = 50 50 50 50 ;Experience point value at each level
  IsTrainable         = No  
  CommandSet          = AmericaVehicleChinookCommandSet
  ArmorSet
    Conditions      = None
    Armor           = ChinookArmor
    DamageFX        = None
  End

  ; *** AUDIO Parameters ***
  VoiceSelect     = ChinookVoiceSelect
  VoiceMove       = ChinookVoiceMove
  VoiceAttack     = ChinookVoiceAttack
  SoundAmbient    = ChinookAmbientLoop
  SoundAmbientRubble    = NoSound
  SoundEnter      = HumveeEnter
  SoundExit       = HumveeExit
  UnitSpecificSounds
    VoiceCreate         = ChinookVoiceCreate
    VoiceSupply         = ChinookVoiceSupply
    VoiceUnload         = ChinookVoiceUnload
    VoiceCombatDrop     = ChinookVoiceCombatDrop
    VoiceClearBuilding  = RangerVoiceClearBuilding ;Special combat drop that clears buildings!
    VoiceGarrison       = ChinookVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = UNIT
  ; note that, although Chinooks aren't produced at helipads, we want to set this KINDOF so that they can land at
  ; (well, "near" actually) an Airfield to get healed...
  ; also note that we should NOT set CAN_ATTACK for chinooks. they can't attack. so there.
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS SELECTABLE VEHICLE TRANSPORT AIRCRAFT HARVESTER SCORE PRODUCED_AT_HELIPAD

  Body = ActiveBody ModuleTag_03
    MaxHealth       = 300.0
    InitialHealth   = 300.0
  End

  Behavior = FXListDie ModuleTag_05
    DeathFX = FX_HelicopterStartDeath
  End

  Behavior                       = TransitionDamageFX ModuleTag_06
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
  End

  Behavior = ChinookAIUpdate ModuleTag_07
    MaxBoxes                = 8
    SupplyCenterActionDelay = 2900 ;3000     ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1200 ;1250  ; 875 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = ChinookVoiceSuppliesDepleted
    NumRopes                = 4
    ; these define how long we can wait, once a guy is on-rope, before throwing another
    ; guy onto that same rope. (Hint: you don't want to use zero.) Omit entirely
    ; and we'll wait for each guy to clear before spawning another.
    PerRopeDelayMin         = 900
    PerRopeDelayMax         = 1500
    RopeWidth               = 0.5
    RopeColor               = R:0 G:0 B:0
    RopeWobbleLen           = 10
    RopeWobbleAmplitude     = 0.25
    RopeWobbleRate          = 180
    RopeFinalHeight         = 10    ; stop this far above ground
    RappelSpeed             = 30
    MinDropHeight           = 40    ; if dropping into a tall bldg, go at least this far above it
    UpgradedSupplyBoost     = 60    ; increase in value of the crates when supply lines has been upgraded
  End
  Locomotor = SET_NORMAL    ChinookLocomotor
  Locomotor = SET_TAXIING   BasicHelicopterTaxiLocomotor

  Behavior = TransportContain ModuleTag_08
    Slots                 = 10
    DamagePercentToUnits  = 100%
    AllowInsideKindOf     = INFANTRY VEHICLE
    ForbidInsideKindOf    = AIRCRAFT HUGE_VEHICLE
    ExitDelay             = 100
    NumberOfExitPaths     = 1
  End
  Behavior = PhysicsBehavior ModuleTag_09
    Mass = 50.0
  End
  Behavior = HelicopterSlowDeathBehavior ModuleTag_10
    DestructionDelay                = 99999999        ; the destruction delay
    SpiralOrbitTurnRate             = 140.0           ; in degrees per second, bigger # = tighter spiral
    SpiralOrbitForwardSpeed         = 350.0           ; bigger # = larger spiral
    SpiralOrbitForwardSpeedDamping  = .9999           ; smaller #'s = slow down faster
    MaxBraking                      = 190   ; max braking we can use during death spiral (lower num = wilder spiral)    
    SoundDeathLoop                  = ComancheDamagedLoop
    MinSelfSpin                     = 100                     ; in degrees per second
    MaxSelfSpin                     = 300                     ; in degrees per second
    SelfSpinUpdateDelay             = 100                     ; in milliseconds
    SelfSpinUpdateAmount            = 10                      ; in degrees   
    FallHowFast                     = 12.0%                   ; fraction of gravity, lower = take longer to fall
    MinBladeFlyOffDelay             = 1500                    ; in milliseconds
    MaxBladeFlyOffDelay             = 1500                    ; in milliseconds
    AttachParticle                  = SootySmokeTrail
    AttachParticleBone              = Propeller02
    BladeObjectName                 = ComancheBlades
    BladeBoneName                   = Propeller01    
    FXBlade                         = FX_HelicopterBladeExplosion
    OCLBlade                        = OCL_HelicopterBladeExplosion
    FXHitGround                     = FX_HelicopterHitGround
    OCLHitGround                    = OCL_HelicopterHitGround
    FXFinalBlowUp                   = FX_GroundedHelicopterBlowUp
    OCLFinalBlowUp                  = OCL_GroundedHelicopterBlowUp
    DelayFromGroundToFinalDeath     = 30
    FinalRubbleObject               = ChinookRubbleHull
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End
      Scale = 1.30                           ;Scaling
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight = 8.0

  Geometry              = BOX
  GeometryMajorRadius   = 20.0
  GeometryMinorRadius   = 6.0
  GeometryHeight        = 12.0     
  GeometryIsSmall       = No
  Shadow                = SHADOW_VOLUME    
  ShadowSizeX           = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End




;------------------------------------------------------------------------------
Object AmericaJetCargoPlane

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    DefaultConditionState
      Model            = AVCargoPln
      Animation       = AVCargoPln.AVCargoPln
      AnimationMode   = LOOP
      ParticleSysBone = Propeller01 JetBlackTrailThin
      ParticleSysBone = Propeller02 JetBlackTrailThin
      ParticleSysBone = Propeller03 JetBlackTrailThin
      ParticleSysBone = Propeller04 JetBlackTrailThin
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
    End

    ConditionState = DAMAGED
      Model           = AVCargoPln_D
      Animation       = AVCargoPln_D.AVCargoPln_D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Propeller03 JetBlackTrailThin
      ParticleSysBone = Propeller04 JetBlackTrailThin
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End

    ConditionState = REALLYDAMAGED
      Model           = AVCargoPln_D
      Animation       = AVCargoPln_D.AVCargoPln_D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Smoke03 JetFireLarge
      ParticleSysBone = Smoke05 JetFireLarge
      ParticleSysBone = Propeller03 JetBlackTrailThin
      ParticleSysBone = Propeller04 JetBlackTrailThin
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
      ParticleSysBone = Smoke03 JetSmokeLarge
      ParticleSysBone = Smoke05 JetSmokeLarge
    End

    ConditionState = RUBBLE
      Model           = AVCargoPln_D1
      Animation       = AVCargoPln_D.AVCargoPln_D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke06 JetFireLarge
      ParticleSysBone = Smoke03 JetFireLarge
      ParticleSysBone = Smoke05 JetFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke06 JetSmokeLarge
      ParticleSysBone = Smoke03 JetSmokeLarge
      ParticleSysBone = Smoke05 JetSmokeLarge
    End
    
    OkToChangeModelColor = Yes
  ParticlesAttachedToAnimatedBones = Yes 

  End

  Draw = W3DModelDraw ModuleTag_02
    DefaultConditionState
      Model           = AVCargoPln_A2
      Animation       = AVCargoPln_A2.AVCargoPln_A2
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    ConditionState = DOOR_1_OPENING
      Model           = AVCargoPln_A2
      Animation       = AVCargoPln_A2.AVCargoPln_A2
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End
    ConditionState = DOOR_1_CLOSING
      Model           = AVCargoPln_A2
      Animation       = AVCargoPln_A2.AVCargoPln_A2
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End
  End
  
  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:CargoPlane
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 0.0 
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = TankDamageFX
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End
  CommandSet        = Command_ScriptedTransportDrops

  ; *** AUDIO Parameters ***
  SoundAmbient = C130AmbientLoop
  SoundAmbientRubble    = NoSound

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK VEHICLE SCORE TRANSPORT AIRCRAFT FORCEATTACKABLE IGNORED_IN_GUI EMP_HARDENED
  Body = ActiveBody ModuleTag_03
    MaxHealth       = 1000.0
    InitialHealth   = 1000.0
  End

  ExperienceValue     = 40 40 40 40  ; Experience point value at each level

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 500.0
  End

  ;SCRIPTED SUPPORT: These special powers are triggered directly 
  ;from the transport without creating a transport. This is done 
  ;via new code support and CreateLocation USE_OWNER_OBJECT -- 
  ;which also prevents creating the payload transport.
  Behavior    = OCLSpecialPower ModuleTag_05
    SpecialPowerTemplate = SuperweaponDaisyCutter ;@@KRIS@@
    OCL                  = SUPERWEAPON_DaisyCutter
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End
  Behavior    = OCLSpecialPower ModuleTag_06
    SpecialPowerTemplate = SuperweaponParadropAmerica
    UpgradeOCL           = SCIENCE_Paradrop3 SUPERWEAPON_Paradrop3
    UpgradeOCL           = SCIENCE_Paradrop2 SUPERWEAPON_Paradrop2
    OCL                  = SUPERWEAPON_Paradrop1
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End 
  Behavior    = OCLSpecialPower ModuleTag_07
    SpecialPowerTemplate = SuperweaponCarpetBomb
    OCL                  = SUPERWEAPON_CarpetBomb
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End 
  Behavior    = OCLSpecialPower ModuleTag_08
    SpecialPowerTemplate = SuperweaponCrateDrop
    OCL                  = SUPERWEAPON_CrateDrop
    CreateLocation       = USE_OWNER_OBJECT
    ScriptedSpecialPowerOnly = Yes
  End 

  Behavior = DeliverPayloadAIUpdate ModuleTag_09
    DoorDelay         = 500
    MaxAttempts       = 4
    DropOffset        = X:0 Y:0 Z:-10
    DropDelay         = 1000 ; time in between each item dropped (if more than one)
    PutInContainer    = AmericaParachute
    DeliveryDistance  = 150
  End
  Locomotor = SET_NORMAL B52Locomotor

  Behavior = TransportContain ModuleTag_10
    Slots = 100                     ; hey, it's a BIG transport
    ScatterNearbyOnExit = No
    OrientLikeContainerOnExit = Yes
    KeepContainerVelocityOnExit = Yes
    ExitPitchRate = 30
    ExitBone = WeaponA01
    AllowInsideKindOf  = INFANTRY VEHICLE PROJECTILE DOZER PARACHUTABLE 
    ;gs I added parachutable as a catch all to prevent making new kindofs (like CRATE)
    DoorOpenTime = 0                ; this prevents the Contain module from messing with the doors, since we want DeliverPayload to handle 'em
    NumberOfExitPaths = 0
    DestroyRidersWhoAreNotFreeToExit = Yes  ; 'destroy' as opposed to 'kill'
  End
    
  Behavior                          = JetSlowDeathBehavior ModuleTag_11
    DestructionDelay                = 2000 
    RollRate                        = 0.0
    RollRateDelta                   = 100%      ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0
    FallHowFast                     = 25.0%    ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_JetBigDeathInitial
    OCLInitialDeath                 = OCL_AmericaJetCargoDeathStart
    DelaySecondaryFromInitialDeath  = 2000       ; in milliseconds     This guy won't hit the ground, so this time equals the above time
    OCLSecondary                    = OCL_AmericaJetCargoHulkDeath
    FXSecondary                     = FX_BigPlaneDeath
;   FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
;   OCLFinalBlowUp                  = OCL_AuroraDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_12
;;;;;;;;  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_13
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 4     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 5     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = TransitionDamageFX ModuleTag_17
    DamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
  End


  Geometry = Box
  GeometryIsSmall = No
  GeometryMajorRadius = 40.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length
End
